package main.java.indi.zyj.sword;

public class IceBreakingGame {

    public int iceBreakingGame(int num, int target) {

        int ans = 0;

        for (int i = 2; i <= num; i++) {
            ans = (target + ans) % i;
        }

        return ans;

    }
}
